package com.topcoder.srm519;

public class BinaryCards {
	public long largestNumber(long A, long B) {
		long c = A ^ B;
		long t = 0;
		while (c > 0) {
			c >>= 1;
			t = (t<<1) + 1;
		}
		return (A&B) | t;
	}
}
